// src/api/api.ts
import request from "@/utils/request";

/**
 * 获取日总订单量
 * @param data
 * @returns
 */
export const dailyOrderCountApi = () => {
  return request({
    url: "/api/order/dailyOrderCount",
    method: "GET",
  });
};

/**
 * 获取总订单量
 * @param data
 * @returns
 */
export const totalOrderCountApi = () => {
  return request({
    url: "/api/order/totalOrderCount",
    method: "GET",
  });
};

/**
 * 获取总仓库数
 * @param data
 * @returns
 */
export const totalWarehouseCountApi = () => {
  return request({
    url: "/api/warehouse/totalWarehouseCount",
    method: "GET",
  });
};

/**
 * 获取总门面数
 * @param data
 * @returns
 */
export const totalStoreCountApi = () => {
  return request({
    url: "/api/store/totalStoreCount",
    method: "GET",
  });
};

/**
 * 获取总商品数
 * @param data
 * @returns
 */
export const totalGoodsCountApi = () => {
  return request({
    url: "/api/goods/totalGoodsCount",
    method: "GET",
  });
};

/**
 * 根据仓库ID获取订单信息
 * @param data
 * @returns
 */
export const dailyOrderCountByOriginIdApi = (id: number) => {
  return request({
    url: `/api/order/dailyOrderCountByOriginId/${id}`,
    method: "GET",
  });
};

/**
 * 根据仓库ID获取订单状态信息
 * @param data
 * @returns
 */
export const orderStatusCountByOriginIdApi = (id: number) => {
  return request({
    url: `/api/order/orderStatusCountByOriginId/${id}`,
    method: "GET",
  });
};

/**
 * 根据门面ID获取订单信息
 * @param data
 * @returns
 */
export const dailyOrderCountByOriginIdAndOrderTypeApi = (id: number) => {
  return request({
    url: `/api/order/dailyOrderCountByOriginIdAndOrderType/${id}`,
    method: "GET",
  });
};

/**
 * 根据门面ID获取订单状态信息
 * @param data
 * @returns
 */
export const orderStatusCountByOriginIdAndOrderTypeApi = (id: number) => {
  return request({
    url: `/api/order/orderStatusCountByOriginIdAndOrderType/${id}`,
    method: "GET",
  });
};
